package co.yixiang.modules.user.domain;


import co.yixiang.domain.BaseDomain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * <p>
 * 用户地址表
 * </p>
 *
 * @author hupeng
 * @since 2019-10-28
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "YxUserAddress对象", description = "用户地址表")
public class YxUserAddress extends BaseDomain {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户地址id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "用户id")
    private Long uid;

    @ApiModelProperty(value = "收货人姓名")
    private String realName;

    @ApiModelProperty(value = "收货人电话")
    private String phone;

    @ApiModelProperty(value = "收货人所在省")
    private String province;

    @ApiModelProperty(value = "收货人所在市")
    private String city;

    private Integer cityId;

    @ApiModelProperty(value = "收货人所在区")
    private String district;

    @ApiModelProperty(value = "收货人详细地址")
    private String detail;

    @ApiModelProperty(value = "邮编")
    private String postCode;

    @ApiModelProperty(value = "经度")
    private String longitude;

    @ApiModelProperty(value = "纬度")
    private String latitude;

    @ApiModelProperty(value = "是否默认")
    private Integer isDefault;

    public static YxUserAddressBuilder builder() {
        return new YxUserAddressBuilder();
    }

    public static class YxUserAddressBuilder {
        private Long id;
        private Long uid;
        private String realName;
        private String phone;
        private String province;
        private String city;
        private Integer cityId;
        private String district;
        private String detail;
        private String postCode;
        private String longitude;
        private String latitude;
        private Integer isDefault;

        YxUserAddressBuilder() {
        }

        public YxUserAddressBuilder id(Long id) {
            this.id = id;
            return this;
        }

        public YxUserAddressBuilder uid(Long uid) {
            this.uid = uid;
            return this;
        }

        public YxUserAddressBuilder realName(String realName) {
            this.realName = realName;
            return this;
        }

        public YxUserAddressBuilder phone(String phone) {
            this.phone = phone;
            return this;
        }

        public YxUserAddressBuilder province(String province) {
            this.province = province;
            return this;
        }

        public YxUserAddressBuilder city(String city) {
            this.city = city;
            return this;
        }

        public YxUserAddressBuilder cityId(Integer cityId) {
            this.cityId = cityId;
            return this;
        }

        public YxUserAddressBuilder district(String district) {
            this.district = district;
            return this;
        }

        public YxUserAddressBuilder detail(String detail) {
            this.detail = detail;
            return this;
        }

        public YxUserAddressBuilder postCode(String postCode) {
            this.postCode = postCode;
            return this;
        }

        public YxUserAddressBuilder longitude(String longitude) {
            this.longitude = longitude;
            return this;
        }

        public YxUserAddressBuilder latitude(String latitude) {
            this.latitude = latitude;
            return this;
        }

        public YxUserAddressBuilder isDefault(Integer isDefault) {
            this.isDefault = isDefault;
            return this;
        }

        public YxUserAddress build() {
            return new YxUserAddress(id, uid, realName, phone, province, city, cityId, district, detail, postCode, longitude, latitude, isDefault);
        }

        public String toString() {
            return "YxUserAddress.YxUserAddressBuilder(id=" + this.id + ", uid=" + this.uid + ", realName=" + this.realName + ", phone=" + this.phone + ", province=" + this.province + ", city=" + this.city + ", cityId=" + this.cityId + ", district=" + this.district + ", detail=" + this.detail + ", postCode=" + this.postCode + ", longitude=" + this.longitude + ", latitude=" + this.latitude + ", isDefault=" + this.isDefault + ")";
        }
    }
}
